<?php
	require_once("conexion/conexion.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Formulario Busqueda</title>
<link href="Estilos/global.css" rel="stylesheet" type="text/css" />
<link href="Estilos/local.css" rel="stylesheet" type="text/css" />
<link href="Estilos/CssTabla3.css" rel="stylesheet" type="text/css" />

<script src="include_js/jquery.js" type="text/javascript"></script>

</head>

<body>
<form name="form_Busqueda_Decl" id="form_Busqueda_Decl" method="post">
<table width="100%" border="0" cellpadding="0">
  <tr>
  <td><div class='option2'><label style="font:Verdana, Arial, Helvetica, sans-serif; color:#0066CC; font-weight:bold;">Secci&oacute;n de busqueda.</label></div>
  	<div class='groupbox'>
		<table width="100%" border="0" class="tres" cellpadding="0" cellspacing="0">
  
  <tr style="border:1px solid #6593C0;">
    <td width="49%" style="border:1px solid #6593C0;"><label style="color:#FFFFFF; font-weight:bold;">Area Extracci&oacute;n</label></td>
    <td width="17%" style="border:1px solid #6593C0;"><label style="color:#FFFFFF; font-weight:bold;">Mes</label></td>
    <td width="20%" style="border:1px solid #6593C0;"><label style="color:#FFFFFF; font-weight:bold;">A&ntilde;o</label></td>
    <td width="14%" style="border:1px solid #6593C0;">&nbsp;</td>
  </tr>
  <tr style="border:1px solid #6593C0;">
    <td style="border:1px solid #6593C0;"><select name="cmb_Area" id="cmb_Area">
		  <option value="0">--AREA EXTRACCION--</option>
		  <?php
            	$con = new Conexion();
        		$con2 = $con->conexionBD("fpproduccion");
                $sql = "select AECod,AENombre from areaextraccion where 1 order by AENombre";
                $resultado = mysql_query($sql) or die ($con->error_mysql("Error en la consulta".mysql_error()));
				$fila = mysql_num_rows($resultado);
				while ($row = mysql_fetch_row($resultado))
				{
					echo "<option value='".$row[0]."'>".$row[1]." "."(".$row[0].")"."</option>";
				}
                $con->cerrarBD();
		?>
		  </select></td>
    <td style="border:1px solid #6593C0;"><select name="cmb_Mes" id="cmb_Mes">
        <option value="0">--MES--</option>
        <option value="01">ENERO</option>
        <option value="02">FEBRERO</option>
        <option value="03">MARZO</option>
        <option value="04">ABRIL</option>
        <option value="05">MAYO</option>
        <option value="06">JUNIO</option>
        <option value="07">JULIO</option>
        <option value="08">AGOSTO</option>
        <option value="09">SEPTIEMBRE</option>
        <option value="10">OCTUBRE</option>
        <option value="11">NOVIEMBRE</option>
        <option value="12">DICIEMBRE</option>
      </select></td>
    <td style="border:1px solid #6593C0;"><select name="cmb_Agno" id="cmb_Agno">
	<option value="0">--A&Ntilde;O--</option>
	<option value="2011">2011</option>
	<option value="2012">2012</option>
	<option value="2013">2013</option>
	</select></td>
    <td style="border:1px solid #6593C0;"><input type="button" name="btn_Buscar" id="btn_Buscar" value=" " class="buscar" /></td>
  </tr>
  <tr style="border:1px solid #6593C0;">
    <td style="border:1px solid #6593C0;"><label style="color:#FFFFFF; font-weight:bold;">Valor UF (ej:20998.52)</label></td>
    <td style="border:1px solid #6593C0;">&nbsp;</td>
    <td style="border:1px solid #6593C0;">&nbsp;</td>
    <td style="border:1px solid #6593C0;">&nbsp;</td>
  </tr>
  <tr style="border:1px solid #6593C0;">
    <td style="border:1px solid #6593C0;"><input name="txtUF" id="txtUF" type="text" /></td>
    <td style="border:1px solid #6593C0;">&nbsp;</td>
    <td style="border:1px solid #6593C0;">&nbsp;</td>
    <td style="border:1px solid #6593C0;">&nbsp;</td>
  </tr>
</table>
</div>
  </td>
  </tr>
</table>

</form>
<table width="100%" border="0" cellpadding="2" cellspacing="0">
  <tr>
    <td><div id="capa"></div></td>
  </tr>
</table>
</body>
<script>
$('#btn_Buscar').click(function() 
{ 
        $.ajax({
            type: 'POST',
            url: 'Produccion/carga_busqueda_CalculoPsmb.php',
            data: $('#form_Busqueda_Decl').serialize(),
            success: function(data) {
                $('#capa').html(data);
            }
        })
});
</script>
</html>